﻿
<style>

.stopped {color:#aaa;}
.stopped td a { color:#aaa;}
.templateCmd { cursor:pointer; margin-left:10px;}
.cmdStart { color:red; font-weight:bold;}
.approveInfo {color:Red; font-size:12px; margin-right:5px;}

.msg  {
     width:380px; 
     white-space:nowrap;
     text-overflow:clip;
     -moz-text-overflow:clip;
     overflow: hidden;
}
</style>

<table style="width: 100%" id="dataAdminList" data-sortAction="#{sortAction}">	<tr class="adminBar">
		<td colspan="5"><a href="#{addUrl}"><img src="~img/add.gif"/> 添加导入计划</a></td>

	</tr>

        <tr class="tableHeader">
            <td>排序</td>
            <td>名称</td>
            <td>计划详情</td>
            <td>导入</td>
            <td>管理</td>
        </tr>
        <!-- BEGIN list -->
        <tr class="tableItems #{rowStatus}">
			<td class="sort">
				<img src="~img/up.gif" class="cmdUp right10" data-id="#{s.Id}"/>
				<img src="~img/dn.gif" class="cmdDown" data-id="#{s.Id}"/>
			</td>
            <td>#{s.Name}</td>
            <td><div class="msg" title="#{s.Description}">#{s.ApproveInfo}<a href="#{s.ShowUrl}" style="color:#666;">#{s.Description}</a></div></td>
            <td><a href="#{s.RefreshUrl}">现在导入</a></td>
            <td>
                <a href="#{s.EditUrl}">修改</a>
                <span class="templateCmd">#{s.Cmd}</span>                
                <a href="#{s.DeleteUrl}" class="deleteCmd left10">删除</a>
                    
            </td>
        </tr><!-- END list -->
    </table>
    
<script>
_run( function() {
    $('.cmdStop').click( function() {
        var url = $(this).attr( 'href' );
        $.post( url.toAjax(), function(data) {
            if( data=='ok' ) {
                wojilu.tool.reloadPage();
            }
            else {
                alert( data );
            }
        });
        
    });
    
    $('.cmdStart').click( function() {
        var url = $(this).attr( 'href' );
        $.post( url.toAjax(), function(data) {
            if( data=='ok' ) {
                wojilu.tool.reloadPage();
            }
            else {
                alert( data );
            }
        });
        
    });
});
</script>